package com.com.typhoon.controller;

import com.com.typhoon.annotations.NeedLogin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author shuya | dongfeng.zdf@alibaba-inc.com
 * @description
 * @date 2018/10/19 下午7:58
 * @description
 * @modified by
 * @since V2.0.0
 */
@RestController
public class IndexController {

    @GetMapping("/hello")
    public String hello() {
        return "hello,world";
    }

    @GetMapping("/needlogin")
    @NeedLogin(true)
    public String testNeedLogin() {
        return "needlogin";
    }

    @GetMapping("/noneedlogin")
    @NeedLogin(false)
    public String testNoNeedLogin() {
        return "noneedlogin";
    }

}
